{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "09dad8a7-af2f-4d1f-8fc1-8c54b4cc525c",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Shape: (32605, 35)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>seas_id</th>\n",
       "      <th>season</th>\n",
       "      <th>player_id</th>\n",
       "      <th>player</th>\n",
       "      <th>birth_year</th>\n",
       "      <th>pos</th>\n",
       "      <th>age</th>\n",
       "      <th>experience</th>\n",
       "      <th>lg</th>\n",
       "      <th>tm</th>\n",
       "      <th>...</th>\n",
       "      <th>ft_percent</th>\n",
       "      <th>orb_per_game</th>\n",
       "      <th>drb_per_game</th>\n",
       "      <th>trb_per_game</th>\n",
       "      <th>ast_per_game</th>\n",
       "      <th>stl_per_game</th>\n",
       "      <th>blk_per_game</th>\n",
       "      <th>tov_per_game</th>\n",
       "      <th>pf_per_game</th>\n",
       "      <th>pts_per_game</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>32600</th>\n",
       "      <td>200.0</td>\n",
       "      <td>1947</td>\n",
       "      <td>157.0</td>\n",
       "      <td>Walt Miller</td>\n",
       "      <td>NaN</td>\n",
       "      <td>F</td>\n",
       "      <td>31.0</td>\n",
       "      <td>1</td>\n",
       "      <td>BAA</td>\n",
       "      <td>PIT</td>\n",
       "      <td>...</td>\n",
       "      <td>0.500</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.5</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.3</td>\n",
       "      <td>1.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32601</th>\n",
       "      <td>201.0</td>\n",
       "      <td>1947</td>\n",
       "      <td>158.0</td>\n",
       "      <td>Warren Fenley</td>\n",
       "      <td>NaN</td>\n",
       "      <td>F</td>\n",
       "      <td>24.0</td>\n",
       "      <td>1</td>\n",
       "      <td>BAA</td>\n",
       "      <td>BOS</td>\n",
       "      <td>...</td>\n",
       "      <td>0.511</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.5</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.8</td>\n",
       "      <td>2.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32602</th>\n",
       "      <td>202.0</td>\n",
       "      <td>1947</td>\n",
       "      <td>159.0</td>\n",
       "      <td>Wilbert Kautz</td>\n",
       "      <td>NaN</td>\n",
       "      <td>G-F</td>\n",
       "      <td>31.0</td>\n",
       "      <td>1</td>\n",
       "      <td>BAA</td>\n",
       "      <td>CHS</td>\n",
       "      <td>...</td>\n",
       "      <td>0.534</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.3</td>\n",
       "      <td>5.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32603</th>\n",
       "      <td>203.0</td>\n",
       "      <td>1947</td>\n",
       "      <td>160.0</td>\n",
       "      <td>Woody Grimshaw</td>\n",
       "      <td>NaN</td>\n",
       "      <td>G</td>\n",
       "      <td>27.0</td>\n",
       "      <td>1</td>\n",
       "      <td>BAA</td>\n",
       "      <td>PRO</td>\n",
       "      <td>...</td>\n",
       "      <td>0.477</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.2</td>\n",
       "      <td>2.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32604</th>\n",
       "      <td>204.0</td>\n",
       "      <td>1947</td>\n",
       "      <td>161.0</td>\n",
       "      <td>Wyndol Gray</td>\n",
       "      <td>NaN</td>\n",
       "      <td>G-F</td>\n",
       "      <td>24.0</td>\n",
       "      <td>1</td>\n",
       "      <td>BAA</td>\n",
       "      <td>BOS</td>\n",
       "      <td>...</td>\n",
       "      <td>0.581</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.9</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.9</td>\n",
       "      <td>6.4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 35 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       seas_id  season  player_id          player  birth_year  pos   age  \\\n",
       "32600    200.0    1947      157.0     Walt Miller         NaN    F  31.0   \n",
       "32601    201.0    1947      158.0   Warren Fenley         NaN    F  24.0   \n",
       "32602    202.0    1947      159.0   Wilbert Kautz         NaN  G-F  31.0   \n",
       "32603    203.0    1947      160.0  Woody Grimshaw         NaN    G  27.0   \n",
       "32604    204.0    1947      161.0     Wyndol Gray         NaN  G-F  24.0   \n",
       "\n",
       "       experience   lg   tm  ...  ft_percent  orb_per_game  drb_per_game  \\\n",
       "32600           1  BAA  PIT  ...       0.500           NaN           NaN   \n",
       "32601           1  BAA  BOS  ...       0.511           NaN           NaN   \n",
       "32602           1  BAA  CHS  ...       0.534           NaN           NaN   \n",
       "32603           1  BAA  PRO  ...       0.477           NaN           NaN   \n",
       "32604           1  BAA  BOS  ...       0.581           NaN           NaN   \n",
       "\n",
       "       trb_per_game  ast_per_game  stl_per_game  blk_per_game  tov_per_game  \\\n",
       "32600           NaN           0.5           NaN           NaN           NaN   \n",
       "32601           NaN           0.5           NaN           NaN           NaN   \n",
       "32602           NaN           0.7           NaN           NaN           NaN   \n",
       "32603           NaN           0.0           NaN           NaN           NaN   \n",
       "32604           NaN           0.9           NaN           NaN           NaN   \n",
       "\n",
       "       pf_per_game  pts_per_game  \n",
       "32600          1.3           1.9  \n",
       "32601          1.8           2.6  \n",
       "32602          2.3           5.1  \n",
       "32603          1.2           2.9  \n",
       "32604          1.9           6.4  \n",
       "\n",
       "[5 rows x 35 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "\n",
    "df = pd.read_csv(\"datasets/player_per_game.csv\")\n",
    "\n",
    "print(\"Shape:\", df.shape)\n",
    "df.tail()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3e29ac84-57ea-456e-a298-3de641f0801c",
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "#checking for non-numeric columns and missing data\n",
    "df.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "2e608844-a297-4541-8d4b-c0f2b11a1bc2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([2025, 2024, 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015,\n",
       "       2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005, 2004,\n",
       "       2003, 2002, 2001, 2000, 1999, 1998, 1997, 1996, 1995, 1994, 1993,\n",
       "       1992, 1991, 1990, 1989, 1988, 1987, 1986, 1985, 1984, 1983, 1982,\n",
       "       1981, 1980, 1979, 1978, 1977, 1976, 1975, 1974, 1973, 1972, 1971,\n",
       "       1970, 1969, 1968, 1967, 1966, 1965, 1964, 1963, 1962, 1961, 1960,\n",
       "       1959, 1958, 1957, 1956, 1955, 1954, 1953, 1952, 1951, 1950, 1949,\n",
       "       1948, 1947])"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#finds all seasons in dataset\n",
    "df['season'].unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "1a6cd10c-76a5-4871-974c-899ca09a1995",
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    },
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>seas_id</th>\n",
       "      <th>season</th>\n",
       "      <th>player_id</th>\n",
       "      <th>player</th>\n",
       "      <th>birth_year</th>\n",
       "      <th>pos</th>\n",
       "      <th>age</th>\n",
       "      <th>experience</th>\n",
       "      <th>lg</th>\n",
       "      <th>tm</th>\n",
       "      <th>...</th>\n",
       "      <th>ft_percent</th>\n",
       "      <th>orb_per_game</th>\n",
       "      <th>drb_per_game</th>\n",
       "      <th>trb_per_game</th>\n",
       "      <th>ast_per_game</th>\n",
       "      <th>stl_per_game</th>\n",
       "      <th>blk_per_game</th>\n",
       "      <th>tov_per_game</th>\n",
       "      <th>pf_per_game</th>\n",
       "      <th>pts_per_game</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>730</th>\n",
       "      <td>32601.0</td>\n",
       "      <td>2025</td>\n",
       "      <td>4299.0</td>\n",
       "      <td>Zach LaVine</td>\n",
       "      <td>NaN</td>\n",
       "      <td>SG</td>\n",
       "      <td>29.0</td>\n",
       "      <td>11</td>\n",
       "      <td>NBA</td>\n",
       "      <td>SAC</td>\n",
       "      <td>...</td>\n",
       "      <td>0.874</td>\n",
       "      <td>0.3</td>\n",
       "      <td>3.2</td>\n",
       "      <td>3.5</td>\n",
       "      <td>3.8</td>\n",
       "      <td>0.6</td>\n",
       "      <td>0.1</td>\n",
       "      <td>2.7</td>\n",
       "      <td>1.8</td>\n",
       "      <td>22.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>731</th>\n",
       "      <td>32602.0</td>\n",
       "      <td>2025</td>\n",
       "      <td>4898.0</td>\n",
       "      <td>Zeke Nnaji</td>\n",
       "      <td>NaN</td>\n",
       "      <td>PF</td>\n",
       "      <td>24.0</td>\n",
       "      <td>5</td>\n",
       "      <td>NBA</td>\n",
       "      <td>DEN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.614</td>\n",
       "      <td>0.6</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.6</td>\n",
       "      <td>0.4</td>\n",
       "      <td>0.4</td>\n",
       "      <td>0.7</td>\n",
       "      <td>0.2</td>\n",
       "      <td>1.1</td>\n",
       "      <td>3.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>732</th>\n",
       "      <td>32603.0</td>\n",
       "      <td>2025</td>\n",
       "      <td>5024.0</td>\n",
       "      <td>Ziaire Williams</td>\n",
       "      <td>NaN</td>\n",
       "      <td>SF</td>\n",
       "      <td>23.0</td>\n",
       "      <td>4</td>\n",
       "      <td>NBA</td>\n",
       "      <td>BRK</td>\n",
       "      <td>...</td>\n",
       "      <td>0.821</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.6</td>\n",
       "      <td>4.6</td>\n",
       "      <td>1.3</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.4</td>\n",
       "      <td>1.1</td>\n",
       "      <td>2.4</td>\n",
       "      <td>10.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>733</th>\n",
       "      <td>32604.0</td>\n",
       "      <td>2025</td>\n",
       "      <td>4803.0</td>\n",
       "      <td>Zion Williamson</td>\n",
       "      <td>NaN</td>\n",
       "      <td>PF</td>\n",
       "      <td>24.0</td>\n",
       "      <td>5</td>\n",
       "      <td>NBA</td>\n",
       "      <td>NOP</td>\n",
       "      <td>...</td>\n",
       "      <td>0.656</td>\n",
       "      <td>2.5</td>\n",
       "      <td>4.7</td>\n",
       "      <td>7.2</td>\n",
       "      <td>5.3</td>\n",
       "      <td>1.2</td>\n",
       "      <td>0.9</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.7</td>\n",
       "      <td>24.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>734</th>\n",
       "      <td>32605.0</td>\n",
       "      <td>2025</td>\n",
       "      <td>5313.0</td>\n",
       "      <td>Zyon Pullin</td>\n",
       "      <td>NaN</td>\n",
       "      <td>SG</td>\n",
       "      <td>23.0</td>\n",
       "      <td>1</td>\n",
       "      <td>NBA</td>\n",
       "      <td>MEM</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 35 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     seas_id  season  player_id           player  birth_year pos   age  \\\n",
       "730  32601.0    2025     4299.0      Zach LaVine         NaN  SG  29.0   \n",
       "731  32602.0    2025     4898.0       Zeke Nnaji         NaN  PF  24.0   \n",
       "732  32603.0    2025     5024.0  Ziaire Williams         NaN  SF  23.0   \n",
       "733  32604.0    2025     4803.0  Zion Williamson         NaN  PF  24.0   \n",
       "734  32605.0    2025     5313.0      Zyon Pullin         NaN  SG  23.0   \n",
       "\n",
       "     experience   lg   tm  ...  ft_percent  orb_per_game  drb_per_game  \\\n",
       "730          11  NBA  SAC  ...       0.874           0.3           3.2   \n",
       "731           5  NBA  DEN  ...       0.614           0.6           1.0   \n",
       "732           4  NBA  BRK  ...       0.821           1.0           3.6   \n",
       "733           5  NBA  NOP  ...       0.656           2.5           4.7   \n",
       "734           1  NBA  MEM  ...         NaN           0.0           0.0   \n",
       "\n",
       "     trb_per_game  ast_per_game  stl_per_game  blk_per_game  tov_per_game  \\\n",
       "730           3.5           3.8           0.6           0.1           2.7   \n",
       "731           1.6           0.4           0.4           0.7           0.2   \n",
       "732           4.6           1.3           1.0           0.4           1.1   \n",
       "733           7.2           5.3           1.2           0.9           3.0   \n",
       "734           0.0           0.0           0.0           0.0           0.0   \n",
       "\n",
       "     pf_per_game  pts_per_game  \n",
       "730          1.8          22.4  \n",
       "731          1.1           3.2  \n",
       "732          2.4          10.0  \n",
       "733          2.7          24.6  \n",
       "734          0.0           0.0  \n",
       "\n",
       "[5 rows x 35 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#filter by latest season\n",
    "latest_season = df['season'].max()\n",
    "df = df[df['season'] == latest_season]\n",
    "df.tail()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "ddb5e820-49d2-4d67-a0b1-4ed1324e9e04",
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "birth_year      733\n",
       "fg_percent        4\n",
       "x3p_percent      45\n",
       "x2p_percent      11\n",
       "e_fg_percent      4\n",
       "ft_percent       42\n",
       "dtype: int64"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "missing = df.columns[df.isnull().any()]\n",
    "df[missing].isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "47bc37de-7891-4d45-aed9-0aa788e6afbb",
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>seas_id</th>\n",
       "      <th>season</th>\n",
       "      <th>player_id</th>\n",
       "      <th>player</th>\n",
       "      <th>birth_year</th>\n",
       "      <th>pos</th>\n",
       "      <th>age</th>\n",
       "      <th>experience</th>\n",
       "      <th>lg</th>\n",
       "      <th>tm</th>\n",
       "      <th>...</th>\n",
       "      <th>ft_percent</th>\n",
       "      <th>orb_per_game</th>\n",
       "      <th>drb_per_game</th>\n",
       "      <th>trb_per_game</th>\n",
       "      <th>ast_per_game</th>\n",
       "      <th>stl_per_game</th>\n",
       "      <th>blk_per_game</th>\n",
       "      <th>tov_per_game</th>\n",
       "      <th>pf_per_game</th>\n",
       "      <th>pts_per_game</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>31871.0</td>\n",
       "      <td>2025</td>\n",
       "      <td>5025.0</td>\n",
       "      <td>A.J. Green</td>\n",
       "      <td>NaN</td>\n",
       "      <td>SG</td>\n",
       "      <td>25.0</td>\n",
       "      <td>3</td>\n",
       "      <td>NBA</td>\n",
       "      <td>MIL</td>\n",
       "      <td>...</td>\n",
       "      <td>0.815</td>\n",
       "      <td>0.2</td>\n",
       "      <td>2.1</td>\n",
       "      <td>2.4</td>\n",
       "      <td>1.5</td>\n",
       "      <td>0.5</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.5</td>\n",
       "      <td>2.2</td>\n",
       "      <td>7.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>31872.0</td>\n",
       "      <td>2025</td>\n",
       "      <td>5026.0</td>\n",
       "      <td>A.J. Lawson</td>\n",
       "      <td>NaN</td>\n",
       "      <td>SG</td>\n",
       "      <td>24.0</td>\n",
       "      <td>3</td>\n",
       "      <td>NBA</td>\n",
       "      <td>TOR</td>\n",
       "      <td>...</td>\n",
       "      <td>0.683</td>\n",
       "      <td>0.8</td>\n",
       "      <td>2.5</td>\n",
       "      <td>3.3</td>\n",
       "      <td>1.2</td>\n",
       "      <td>0.5</td>\n",
       "      <td>0.2</td>\n",
       "      <td>0.6</td>\n",
       "      <td>1.7</td>\n",
       "      <td>9.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>31873.0</td>\n",
       "      <td>2025</td>\n",
       "      <td>5210.0</td>\n",
       "      <td>AJ Johnson</td>\n",
       "      <td>NaN</td>\n",
       "      <td>SG</td>\n",
       "      <td>20.0</td>\n",
       "      <td>1</td>\n",
       "      <td>NBA</td>\n",
       "      <td>TOT</td>\n",
       "      <td>...</td>\n",
       "      <td>0.865</td>\n",
       "      <td>0.3</td>\n",
       "      <td>1.8</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.6</td>\n",
       "      <td>0.4</td>\n",
       "      <td>0.1</td>\n",
       "      <td>1.2</td>\n",
       "      <td>1.7</td>\n",
       "      <td>7.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>31874.0</td>\n",
       "      <td>2025</td>\n",
       "      <td>5210.0</td>\n",
       "      <td>AJ Johnson</td>\n",
       "      <td>NaN</td>\n",
       "      <td>SG</td>\n",
       "      <td>20.0</td>\n",
       "      <td>1</td>\n",
       "      <td>NBA</td>\n",
       "      <td>MIL</td>\n",
       "      <td>...</td>\n",
       "      <td>0.500</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.6</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>31875.0</td>\n",
       "      <td>2025</td>\n",
       "      <td>5210.0</td>\n",
       "      <td>AJ Johnson</td>\n",
       "      <td>NaN</td>\n",
       "      <td>SG</td>\n",
       "      <td>20.0</td>\n",
       "      <td>1</td>\n",
       "      <td>NBA</td>\n",
       "      <td>WAS</td>\n",
       "      <td>...</td>\n",
       "      <td>0.886</td>\n",
       "      <td>0.4</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.4</td>\n",
       "      <td>3.1</td>\n",
       "      <td>0.5</td>\n",
       "      <td>0.1</td>\n",
       "      <td>1.4</td>\n",
       "      <td>2.3</td>\n",
       "      <td>9.1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 35 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   seas_id  season  player_id       player  birth_year pos   age  experience  \\\n",
       "0  31871.0    2025     5025.0   A.J. Green         NaN  SG  25.0           3   \n",
       "1  31872.0    2025     5026.0  A.J. Lawson         NaN  SG  24.0           3   \n",
       "2  31873.0    2025     5210.0   AJ Johnson         NaN  SG  20.0           1   \n",
       "3  31874.0    2025     5210.0   AJ Johnson         NaN  SG  20.0           1   \n",
       "4  31875.0    2025     5210.0   AJ Johnson         NaN  SG  20.0           1   \n",
       "\n",
       "    lg   tm  ...  ft_percent  orb_per_game  drb_per_game  trb_per_game  \\\n",
       "0  NBA  MIL  ...       0.815           0.2           2.1           2.4   \n",
       "1  NBA  TOR  ...       0.683           0.8           2.5           3.3   \n",
       "2  NBA  TOT  ...       0.865           0.3           1.8           2.0   \n",
       "3  NBA  MIL  ...       0.500           0.0           1.0           1.0   \n",
       "4  NBA  WAS  ...       0.886           0.4           2.0           2.4   \n",
       "\n",
       "   ast_per_game  stl_per_game  blk_per_game  tov_per_game  pf_per_game  \\\n",
       "0           1.5           0.5           0.1           0.5          2.2   \n",
       "1           1.2           0.5           0.2           0.6          1.7   \n",
       "2           2.6           0.4           0.1           1.2          1.7   \n",
       "3           1.0           0.1           0.0           0.6          0.0   \n",
       "4           3.1           0.5           0.1           1.4          2.3   \n",
       "\n",
       "   pts_per_game  \n",
       "0           7.4  \n",
       "1           9.1  \n",
       "2           7.6  \n",
       "3           2.9  \n",
       "4           9.1  \n",
       "\n",
       "[5 rows x 35 columns]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "4eaa9063-6aa0-4999-b665-51655120aae5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>seas_id</th>\n",
       "      <th>season</th>\n",
       "      <th>player_id</th>\n",
       "      <th>player</th>\n",
       "      <th>pos</th>\n",
       "      <th>age</th>\n",
       "      <th>g</th>\n",
       "      <th>gs</th>\n",
       "      <th>mp_per_game</th>\n",
       "      <th>fg_per_game</th>\n",
       "      <th>...</th>\n",
       "      <th>ft_percent</th>\n",
       "      <th>orb_per_game</th>\n",
       "      <th>drb_per_game</th>\n",
       "      <th>trb_per_game</th>\n",
       "      <th>ast_per_game</th>\n",
       "      <th>stl_per_game</th>\n",
       "      <th>blk_per_game</th>\n",
       "      <th>tov_per_game</th>\n",
       "      <th>pf_per_game</th>\n",
       "      <th>pts_per_game</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>31871.0</td>\n",
       "      <td>2025</td>\n",
       "      <td>5025.0</td>\n",
       "      <td>A.J. Green</td>\n",
       "      <td>SG</td>\n",
       "      <td>25.0</td>\n",
       "      <td>73</td>\n",
       "      <td>7.0</td>\n",
       "      <td>22.7</td>\n",
       "      <td>2.5</td>\n",
       "      <td>...</td>\n",
       "      <td>0.815</td>\n",
       "      <td>0.2</td>\n",
       "      <td>2.1</td>\n",
       "      <td>2.4</td>\n",
       "      <td>1.5</td>\n",
       "      <td>0.5</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.5</td>\n",
       "      <td>2.2</td>\n",
       "      <td>7.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>31872.0</td>\n",
       "      <td>2025</td>\n",
       "      <td>5026.0</td>\n",
       "      <td>A.J. Lawson</td>\n",
       "      <td>SG</td>\n",
       "      <td>24.0</td>\n",
       "      <td>26</td>\n",
       "      <td>2.0</td>\n",
       "      <td>18.7</td>\n",
       "      <td>3.1</td>\n",
       "      <td>...</td>\n",
       "      <td>0.683</td>\n",
       "      <td>0.8</td>\n",
       "      <td>2.5</td>\n",
       "      <td>3.3</td>\n",
       "      <td>1.2</td>\n",
       "      <td>0.5</td>\n",
       "      <td>0.2</td>\n",
       "      <td>0.6</td>\n",
       "      <td>1.7</td>\n",
       "      <td>9.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>31873.0</td>\n",
       "      <td>2025</td>\n",
       "      <td>5210.0</td>\n",
       "      <td>AJ Johnson</td>\n",
       "      <td>SG</td>\n",
       "      <td>20.0</td>\n",
       "      <td>29</td>\n",
       "      <td>11.0</td>\n",
       "      <td>22.0</td>\n",
       "      <td>2.8</td>\n",
       "      <td>...</td>\n",
       "      <td>0.865</td>\n",
       "      <td>0.3</td>\n",
       "      <td>1.8</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.6</td>\n",
       "      <td>0.4</td>\n",
       "      <td>0.1</td>\n",
       "      <td>1.2</td>\n",
       "      <td>1.7</td>\n",
       "      <td>7.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>31874.0</td>\n",
       "      <td>2025</td>\n",
       "      <td>5210.0</td>\n",
       "      <td>AJ Johnson</td>\n",
       "      <td>SG</td>\n",
       "      <td>20.0</td>\n",
       "      <td>7</td>\n",
       "      <td>0.0</td>\n",
       "      <td>6.3</td>\n",
       "      <td>1.1</td>\n",
       "      <td>...</td>\n",
       "      <td>0.500</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.6</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>31875.0</td>\n",
       "      <td>2025</td>\n",
       "      <td>5210.0</td>\n",
       "      <td>AJ Johnson</td>\n",
       "      <td>SG</td>\n",
       "      <td>20.0</td>\n",
       "      <td>22</td>\n",
       "      <td>11.0</td>\n",
       "      <td>27.0</td>\n",
       "      <td>3.4</td>\n",
       "      <td>...</td>\n",
       "      <td>0.886</td>\n",
       "      <td>0.4</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.4</td>\n",
       "      <td>3.1</td>\n",
       "      <td>0.5</td>\n",
       "      <td>0.1</td>\n",
       "      <td>1.4</td>\n",
       "      <td>2.3</td>\n",
       "      <td>9.1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 31 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   seas_id  season  player_id       player pos   age   g    gs  mp_per_game  \\\n",
       "0  31871.0    2025     5025.0   A.J. Green  SG  25.0  73   7.0         22.7   \n",
       "1  31872.0    2025     5026.0  A.J. Lawson  SG  24.0  26   2.0         18.7   \n",
       "2  31873.0    2025     5210.0   AJ Johnson  SG  20.0  29  11.0         22.0   \n",
       "3  31874.0    2025     5210.0   AJ Johnson  SG  20.0   7   0.0          6.3   \n",
       "4  31875.0    2025     5210.0   AJ Johnson  SG  20.0  22  11.0         27.0   \n",
       "\n",
       "   fg_per_game  ...  ft_percent  orb_per_game  drb_per_game  trb_per_game  \\\n",
       "0          2.5  ...       0.815           0.2           2.1           2.4   \n",
       "1          3.1  ...       0.683           0.8           2.5           3.3   \n",
       "2          2.8  ...       0.865           0.3           1.8           2.0   \n",
       "3          1.1  ...       0.500           0.0           1.0           1.0   \n",
       "4          3.4  ...       0.886           0.4           2.0           2.4   \n",
       "\n",
       "   ast_per_game  stl_per_game  blk_per_game  tov_per_game  pf_per_game  \\\n",
       "0           1.5           0.5           0.1           0.5          2.2   \n",
       "1           1.2           0.5           0.2           0.6          1.7   \n",
       "2           2.6           0.4           0.1           1.2          1.7   \n",
       "3           1.0           0.1           0.0           0.6          0.0   \n",
       "4           3.1           0.5           0.1           1.4          2.3   \n",
       "\n",
       "   pts_per_game  \n",
       "0           7.4  \n",
       "1           9.1  \n",
       "2           7.6  \n",
       "3           2.9  \n",
       "4           9.1  \n",
       "\n",
       "[5 rows x 31 columns]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = df.drop(columns=['birth_year', 'experience', 'lg', 'tm',], errors='ignore')\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "07a14c2c-9b0f-48fa-881e-5984509dbab4",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
